package com.dp.decorator.exp02;

/**
 * @Author: Ruomeng
 * @Date: 2024/12/2
 * @Description : design-pattern
 * 抽象装饰者类
 * @Version: 1.0
 */
public class DataLoaderDecorator implements DataLoader {

    private DataLoader dataLoader;

    public DataLoaderDecorator(DataLoader dataLoader) {
        this.dataLoader = dataLoader;
    }

    @Override
    public String read() {
        return dataLoader.read();
    }

    @Override
    public void write(String data) {
        dataLoader.write(data);
    }
}
